package org.reenscape.skill;
import org.reenscape.model.*;
import org.reenscape.lib.*;
import org.reenscape.updater.*;
public class Fishing {

			public void action(PacketParser p3, int lvl) {
				int Percent =  25 + (p3.playerLevel[10] - lvl);
				int Chance = (int) (java.lang.Math.random() * 100);
				p3.resetWalkingQueue();
				if (Chance <= Percent) {
					p3.addItem(p3.fishing[0], 1);
					p3.sendMessage("You catch a fish!");
					p3.addSkillXP(p3.fishing[1], 10);
				}
				p3.fishing[3] = delay;
			}
			
			public void init(PacketParser p3, int fish, int xp, int anim) {
				p3.fishing[0] = fish;
				p3.fishing[1] = xp;
				p3.fishing[2] = anim;
				p3.fishing[3] = delay;
				p3.Animation(p3.fishing[2]);
			}
			
			public void stop(PacketParser p3) {
				p3.fishing[1] = 0;
				p3.fishing[0] = 0;
				p3.fishing[2] = 0;
				p3.fishing[3] = -1;
			}
			
			public int delay = 20;
}